<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page isELIgnored="false"%>
<head>
<head>
<link href="${pageContext.request.contextPath}/system/page.css" rel="stylesheet" />
</head>

<script type="text/javascript">
	function gotoPage(pageNo) {
		$("#pageNo").val(pageNo);
		$("#pageForm").submit();
	}

	function deleteOne(id) {
		if (id == "" || id == null) {
			return;
		}
		art.dialog({
			content : '删除后不可恢复,请确认操作',
			// okVal:'确认删除',
			lock : true,
			ok : function() {
				$("#pageForm").attr("action", "${pageContext.request.contextPath}/system/sysRightDelete.do");
				$("#pageForm #id").val(id);
				$("#pageForm").submit();
				this.title('1秒后自动关闭').time(1);
				return false;
			},
			cancelVal : '关闭',
			cancel : true
		//为true等价于function(){}

		});
	}
	function view(id) {
		if (id == "" || id == null) {
			return;
		}
		$("#pageForm").attr("action", "${pageContext.request.contextPath}/system/sysRightView.do");
		$("#pageForm #id").val(id);
		$("#pageForm").submit();
	}
	function edit(id) {
		if (id == "" || id == null) {
			return;
		}
		$("#pageForm").attr("action", "${pageContext.request.contextPath}/system/sysRightEdit.do");
		$("#pageForm #id").val(id);
		$("#pageForm").submit();
	}
	
	function gotoPageChangePageSize(value){
		$("#pageForm #pageSize").val(value);
		$("#pageForm").submit();
	}
</script>
<form id="pageForm" method="post"
	action="${pageContext.request.contextPath}/system/sysRightList.do"
	onsubmit="return navTabSearch(this);">
	<input type="hidden" id="pageSize" name="page.pageSize" value="${page.pageSize}" />
	<input type="hidden" id="pageNo" name="page.pageNo"
		value="${page.pageNo}" /> <input type="hidden" name="orderField"
		value="${orderField}" /> <input type="hidden" name="pageNum"
		value="1" /> <input type="hidden" name="numPerPage"
		value="${page.pageSize}" />
		<input type="hidden" name="id" id="id" value="${id}" />
		<input type="hidden" name="queryStr" id="queryStr" value="queryStr" />
</form>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<s:iterator value="rights" status="status" id="id">
				<s:if test="#id.equals('deleteAll')">
					<li><a class="delete"
						href="${pageContext.request.contextPath}/system/sysRightDeleteAll.do" target="ajaxTodo"
						title="确定要删除吗?"><span>删除</span> </a></li>
				</s:if>
				<s:if test="#id.equals('add')">
					<li><a class="add"
						href="${pageContext.request.contextPath}/system/sysRightAdd.do"
						target="navTab"><span>添加</span> </a></li>
				</s:if>
			</s:iterator>
			<!-- <li>
				<a class="edit"
					href="${pageContext.request.contextPath}/system/systemEdit.do"
					target="navTab"><span>修改</span> </a>
			</li>
			<li class="line">
				line
			</li>
			<li>
				<a class="icon" href="demo/common/dwz-team.xls" target="dwzExport"
					targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span> </a>
			</li> 
			-->
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="43">
					<div class="gridCol" title="">
						<input type="checkbox" group="ids" class="checkboxCtrl">
					</div>
				</th>
						<th width="80">rightid</th>
						<th width="80">righttype</th>
						<th width="80">rightcode</th>
						<th width="80">grade</th>
						<th width="80">nodetype</th>
						<th width="80">parentid</th>
						<th width="80">pathcode</th>
						<th width="80">rightname</th>
						<th width="80">logflag</th>
						<th width="80">createuser</th>
				<th width="80">操作</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="page.items" status="item" id="item">
				<tr target="sid_user" rel="1">
					<td style="width: 43px;">
						<div>
							<input name="ids" value="<s:property value="item.id"/>"
								type="checkbox">
						</div>
					</td>
							<td width="80">${rightid}</td>
							<td width="80">${righttype}</td>
							<td width="80">${rightcode}</td>
							<td width="80">${grade}</td>
							<td width="80">${nodetype}</td>
							<td width="80">${parentid}</td>
							<td width="80">${pathcode}</td>
							<td width="80">${rightname}</td>
							<td width="80">${logflag}</td>
							<td width="80">${createuser}</td>
					<td>
						<div>
							<s:iterator value="rights" status="status" id="id">
								<s:if test="#id.equals('edit')">
									<a title="编辑" 
										href="javascript:edit('${rightid}')"
										class="btnEdit">编辑</a>
								</s:if>
								<s:if test="#id.equals('delete')">
									<a title="删除" 
										href="javascript:deleteOne('${rightid}')"
										class="btnDel">删除</a>
								</s:if>
								<s:if test="#id.equals('view')">
									<a title="查看" 
										href="javascript:view('${rightid}');"
										class="btnView">查看</a>
								</s:if>
							</s:iterator>
						</div>
					</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages2">
			<jsp:include page="../system/page.jsp" flush="true"></jsp:include>
		</div>
	</div>
</div>
